package day01;

public class Demo04 {
    public static void main(String[] args) {
        /*
         * 测试MyLinkedList
         */
        MyLinkedList<String> list = new MyLinkedList<>();
        list.add("Tom");
        list.add("Jerry");
        list.add("Andy");
        list.add("Nemo");
        list.add("John");
        list.add("Wang");
        list.add("Mick");
        list.add("Micro");
        list.add("Black");
        list.add("Tome");
        list.add("Hook");
        list.add("Mac");
        list.add(3,"Lee");
        list.add(10,"Lee");
        list.add(0, "Robin");
        System.out.println(list.get(3));
        System.out.println(list.get(10));

        System.out.println(list);
        System.out.println(list.remove(0));
        System.out.println(list);
        System.out.println(list.remove(list.size()-1));
        System.out.println(list);
        System.out.println(list.remove(5));
        System.out.println(list);
        list.reverse();
        System.out.println(list);

    }
}
